/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class SmartExhaustFan {
    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device || {};
        this.opts = opts || {};
        this._to = to;
    }

    get categoryCode() {
        return '010030017';
    }

    get categoryName() {
        return '\u667a\u80fd\u6392\u98ce\u673a';
    }

    getFaultAlarm(params) {
        return command({
            method: 'getFaultAlarm',
            methodId: 'pZgRT32U',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSpeed(params) {
        return command({
            method: 'getSpeed',
            methodId: 'pGoxHGiC',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'pUPQ8Vuw',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSpeed(params) {
        return command({
            method: 'setSpeed',
            methodId: 'ppAXISQP',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'peH3nfrm',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default SmartExhaustFan;
